# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-terminado
pkgver=0.18.0
pkgrel=0
pkgdesc="Tornado websocket backend for xterm.js"
url="https://github.com/jupyter/terminado"
arch="noarch"
license="BSD-2-Clause"
depends="py3-ptyprocess py3-tornado"
makedepends="py3-gpep517 py3-hatchling"
checkdepends="py3-pytest py3-pytest-timeout"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jupyter/terminado/archive/refs/tags/v$pkgver.tar.gz
	bash.patch
	"
builddir="$srcdir/terminado-$pkgver/"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest \
		--deselect tests/basic_test.py::UniqueTermTests::test_large_io_doesnt_hang
}

package() {
	python3 -m installer --destdir="$pkgdir" .dist/*.whl
}

sha512sums="
8b82fce407424ed5061c24121f37f851006e1c1420a2dee5deb3590221dd04c33486efb7f9dfd2216522465fddc275d29520f75ba97248a40b2c9d533841eea4  py3-terminado-0.18.0.tar.gz
3e731470ad7d1a5f833e94f0912e2e1941d5337ff52016f94b5a918c78e8b0408aa01b2cba4d6ace64c3f64bc89a7e0e4f8319925afe8e4df00ed480a43fe29b  bash.patch
"
